#include "StyleScene.h"

CStyleScene::CStyleScene()
{
	m_pStyle = NULL;
}

CStyleScene::~CStyleScene()
{
}

bool CStyleScene::Init( GAF_CBundle* pbdlParam )
{
	if(!m_dfGlobal.Init(pbdlParam))
	{
// 		GAF_ERRMARK():
		return false;
	}
	
	if(!SUPER(GAF_CScene)->Init(NULL))
	{
		return false;
	}

	AddGraphics(&m_dfGlobal);

	return true;
}
// 
// void CStyleScene::Update()
// {
// // 	SUPER(GAF_CScene)->Update();
// 	OnUpdate();
// 
// 	GAF_CTimer::UpdateTimers();
// }

CDataFactory* CStyleScene::GetDataFactory()
{
	return &m_dfGlobal;
}

bool CStyleScene::LoadStyle( CStyle* pStyle )
{
	GAF_CHECK_R(m_pStyle == NULL, false);
	GAF_CHECK_R(pStyle != NULL, false);

	m_pStyle = pStyle;

	LoadLayout(m_pStyle->GetLayout());
	return true;
}

bool CStyleScene::UnLoadStyle()
{
	GAF_CHECK_R(m_pStyle != NULL, false);

	m_pStyle = NULL;

	return true;
}

CShowcase* CStyleScene::GetShowcase()
{
	return m_pStyle->Displays(DISPLAY_MAIN);
}
